Partial Dispatch: Optimizing Dynamically-Dispatched Multimethod Calls with Compile-Time Types and Runtime Feedback

نویسندگان

  • Jonathan Bachrach
  • Glenn Burke
چکیده

Dylan is an object-oriented language with a combination of features that present both difficulties and opportunities for efficient compilation. The language is thoroughly objectoriented and supports multimethod dispatch as well as dynamic typing. The semantics of the language are consistently defined in terms of a program runtime model. However, the design goals included providing significant opportunities for compile-time optimizations that are consistent with this runtime model. Additionally, the ability to dynamically add classes and methods is balanced by the ability to seal branches of the class and method hierarchy, thereby declaring them invariant. Optimization proceeds through a pay-as-you-go strategy. Programmers are not required to choose between the extremes of full static dispatch with strict typing and full runtime dispatch with dynamic typing. Instead, type information and constraints can be added incrementally, with resulting incremental improvements in performance, ultimately resulting in performance equivalent to static languages when full type information is available at compile-time. Additional requirements on Functional Developer include the need to support interactive software development and the production of components using separate compilation. The latter requirement a real world constraint for commercial development rules out the possibility of using many whole program analysis techniques. Instead, Functional Developer makes aggressive use of partial type information available at compile-time, and uses novel techniques to combine this with runtime information to produce highly efficient code.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Open Effects: Programmer-guided Effects for Open World Concurrent Programs

The open world assumption makes the design of a type-and-effect system challenging, especially in concurrent object-oriented languages. The main problem is in the computation of the effects of a dynamically dispatched method invocation, because all possible dynamic types of its receiver are not known statically. Previous work proposes effect annotations that provide a static upper bound on the ...

متن کامل

Reconciling Responsiveness with Performance in Pure Object-Oriented Languages

Dynamically-dispatched calls often limit the performance of object-oriented programs since object-oriented programming encourages factoring code into small, reusable units, thereby increasing the frequency of these expensive operations. Frequent calls not only slow down execution with the dispatch overhead per se, but more importantly they hinder optimization by limiting the range and effective...

متن کامل

Multiple dispatch in reflective runtime environment

Message dispatch in object-oriented programming (OOP) involves target method lookup in dispatch table/tree. Reflective environment builds dispatch data-structure at runtime as types can be added at runtime. Hence, algorithms for reflective environments require dynamic data structure for dispatch. In this paper, we propose a tree-based algorithm for multiple dispatch in reflective runtime enviro...

متن کامل

Open Effects: Optimistic Effects for Dynamic Dispatch

The open world assumption in modern object-oriented languages makes the design of a type-and-effect system challenging. The main problem is with the computation of the effects of a dynamically dispatched method call, because all possible dynamic types are not known in advance. We show that the open world assumption and the need for a type-and-effect system can be reconciled. We propose open eff...

متن کامل

Inheritance Management and Method Dispatch in Reeexive Object-oriented Languages

A collection of algorithms and data structures are presented which represent a generalized framework for inheritance management and method dispatch in reeexive, dynamically typed, single-receiver languages with type/implementation-paired multiple inheritance. By storing a small amount of information, the algorithms can incrementally maintain the entire dispatch environment during the four funda...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999